#!/bin/bash
basedir=`dirname $0`
subnet=192.168.70.0/24
proxy=112.73.10.81
proxy_interface=eth1
table=external
/usr/sbin/ip rule show |grep -q "from 192.168.70.0/24 lookup external" || /usr/sbin/ip rule add from $subnet lookup $table
/usr/sbin/ip route add default via $proxy dev $proxy_interface proto static metric 100
echo 1 > /proc/sys/net/ipv4/ip_forward
exit 0
